package com.shenhua.test.rest;


public class ResponseData<T>{

    private String respCode;

    private String respDesc;

    private String bizCode;

    private T data;

    public ResponseData() {
        this.respCode = ResponseEnum.SUCCESSS.getCode();
        this.respDesc = ResponseEnum.SUCCESSS.getDesc();
    }

    public String getRespCode() {
        return this.respCode;
    }

    public void setRespCode(String respCode) {
        this.respCode = respCode;
    }

    public String getRespDesc() {
        return this.respDesc;
    }

    public void setRespDesc(String respDesc) {
        this.respDesc = respDesc;
    }

    public T getData() {
        return this.data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public void setResponseEnum(ResponseEnum responseEnum) {
        this.respCode = responseEnum.getCode();
        this.respDesc = responseEnum.getDesc();
    }

    public String getBizCode() {
        return this.bizCode;
    }

    public void setBizCode(String bizCode) {
        this.bizCode = bizCode;
    }

    public void setBizCodeAutoResponseEnum(String bizCode) {
        this.bizCode = bizCode;
        this.setResponseEnum(ResponseEnum.BUSINESS_ERROR);
    }
}
